﻿{include file='templates/admin/include_header.php'}
<h1>
    <a href="{base_admin_url()}"><i class="icon-arrow-left-3 fg-darker smaller"></i></a>
    Quản Lý<small class="on-right">Truyện Vova</small>
</h1>
{literal}
<script type="text/javascript">
    function confirm_delete() {
      return confirm('Bạn có muốn xóa bản ghi này không?');
    }
</script>
{/literal}
<div class="grid">
    <div class="row">
        {include file='admin/vova/menu.php' }

        <div class="span9">
            <h2 id="_default"><i class="icon-accessibility on-left"></i>{$act_title}</h2>
            <div class="example">
                {form_open('admin/vovaad/search')}
                    <div>
                        <div class="input-control radio default-style" data-role="input-control">
                            <label>
                                {$check0}
                                <span class="check"></span>
                                Cả hai
                            </label>
                        </div>
                        <div class="input-control radio  default-style" data-role="input-control">
                            <label>
                                {$check1}
                                <span class="check"></span>
                                Đã duyệt
                            </label>
                        </div>
                        <div class="input-control radio  default-style" data-role="input-control">
                            <label>
                                {$check2}
                                <span class="check"></span>
                                Chưa duyệt
                            </label>
                        </div>
                        <div class="input-control radio  default-style" data-role="input-control">
                            <label>
                                {$check3}
                                <span class="check"></span>
                                Không duyệt
                            </label>
                        </div>
                    </div>
                    <div class="input-control text">
                        <input type="text" name="search" placeholder="Tìm kiếm" value="{set_value('search', $query_array['search'])}" onkeyup="showHint(this.value)"/>
                        <button class="btn-search" name="btnSearch"></button>
                    </div>
                {form_close()}
                <table class="table bordered hovered">
                    <thead>
                    <tr>
                        <th class="text-center" width="50px">ID</th>
                        <th class="text-left">Tiêu đề</th>
                        <th class="text-left" width="50px">Duyệt</th>
                        <th class="text-left" width="50px">Xóa</th>
                    </tr>
                    </thead>
                    <tbody>
                    {if isset($list)}
                        {foreach from=$list item=value}
                        <tr>
                            <td class="text-center">{$value->id}</td>
                            <td><a href="{base_admin_url('vovaad/edit/')}/{$value->id}">{$value->title}</a></td>
                            <td class="text-center">
                            {if $value->check == 1}
                                <span class="icon-checkmark has-tip tip-right"" data-tooltip data-options="disable_for_touch:true" title="Truyện đã được duyệt!"></span>
                            {elseif $value->check == 2}
                                <span class="icon-cancel has-tip tip-right"" data-tooltip data-options="disable_for_touch:true" title="Truyện đã không được duyệt!"></span>
                            {else}
                                <span class="icon-minus-2 has-tip tip-right"" data-tooltip data-options="disable_for_touch:true" title="Truyện chưa duyệt!"></span>
                            {/if}
                            </td>
                            <td class="center">
                            <a href="{base_admin_url('vovaad/delete/')}/{$value->id}" onclick="return confirm_delete();">
                                <span class="icon-remove has-tip tip-right"" data-tooltip data-options="disable_for_touch:true" title="Xóa truyện này!"></span>
                            </td>
                        </tr>
                        {/foreach}
                    {/if}
                    </tbody>
                    <tfoot>
                    </tfoot>
                </table>
                {$this->pagination->create_links()} Tổng số : {$total}
            </div>
        </div>
    </div>
</div>
{include file='templates/admin/include_footer.php'}